﻿Imports System.Data.SqlClient
Public Class employeeupdate
    Dim cmd As New SqlCommand

    Private Sub employeeupdate_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        condb()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        cmd.Connection = cn
        cmd.CommandText = "update Tblemployee set Employee_Name=N'" & txtname.Text & "',Gender=N'" & txtgender.Text & "',Birthdate=N'" & txtdob.Value & "',Phone_Number=N'" & txtphon.Text & "' ,Start_Date=N'" & txtstartwork.Value & "',Salary=N'" & txtsalary.Text & "',position=N'" & txtposition.Text & "'where Employee_ID='" & txtid.Text & "';"
        cmd.ExecuteNonQuery()
        MessageBox.Show("Update Succes")
        Close()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Close()
    End Sub
End Class